package com.zsrd.lessons.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zsrd.lessons.domain.TsQuestionAnswer;
import com.zsrd.lessons.mapper.TsQuestionAnswerMapper;
import com.zsrd.lessons.service.TsQuestionAnswerService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 题库题目对应的选项 服务实现类
 * </p>
 *
 * @author Chen Wei
 * @since 2022-07-11
 */
@Service
public class TsQuestionAnswerServiceImpl extends ServiceImpl<TsQuestionAnswerMapper, TsQuestionAnswer> implements TsQuestionAnswerService {
    /**
     * 获取题目对应答案
     * @return
     */
     @Override
      public List<TsQuestionAnswer> getAnswer(List questions){
          QueryWrapper queryWrapper =new QueryWrapper();
          queryWrapper.in("tid",questions);
          return this.baseMapper.selectList(queryWrapper);
      }
}
